package cn.sunshine.comprehensive.observer_mediator;

/**
 * @Description cn.sunshine.comprehensive.observer_mediator
 * @Author Mokairui
 * @Since 2021/12/30
 */
public class DefaultMediatorStructure extends SubscribeContext {

    @Override
    public void contact(String message, AbstractUser user) {
        if (user instanceof QQUser) {
            notify(message, WeixinUser.class::isInstance);
        } else if (user instanceof WeixinUser) {
            notify(message, QQUser.class::isInstance);
        }
    }

}
